<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <p>Page 1</p>
    <button onclick="closeSelf()">关闭自己</button>
    <script>
        function closeSelf() {
            window.close();
        }
        console.log("我已经被打开, opener", window.opener);
    </script>
</body>
</html>